Skip to content

Conversation

amliu-jumptrading
Copy link
Collaborator

No description provided.


return (
<Flex direction="column" flexGrow="1" flexShrink="1" height="100%">
<Flex direction="column" height="100%">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't need to be flex, can just be a div or Box with height: 100%

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using flex here to center the slot search vertically on the page. I can take off the direction since it isn't being used though.


return (
<Flex direction="column" gap="2" flexGrow="1" flexShrink="1">
<Flex direction="column" gap="2" width="100%">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to be fine without this width 100% too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the width 100%, the slot content doesn't fill the whole outlet for wider screens


return (
<Grid
width="100%"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unneeded?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without width 100%, the grid will just use the maxWidth and not wrap when the container becomes too narrow to fully fit the columns

useEffect(() => {
if (selectedSlot === undefined) setSearchSlot("");
else setSearchSlot(String(selectedSlot));
}, [selectedSlot]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEffect seems unnecessary? Think you can just init searchSlot state from selectedSlot

const [searchSlot, setSearchSlot] = useState(() =>
    selectedSlot ? String(selectedSlot) : "",
  );

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to use selectedSlot === undefined ? "" : String(selectedSlot) since technically selectedSlot can be 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants